import { Router } from 'express';
import {
  login,
  register,
  getCurrentUser,
  logout
} from '../controllers/authController';

const router = Router();

// POST /api/auth/login - 用户登录
router.post('/login', login);

// POST /api/auth/register - 用户注册
router.post('/register', register);

// GET /api/auth/me - 获取当前用户信息
router.get('/me', getCurrentUser);

// POST /api/auth/logout - 用户登出
router.post('/logout', logout);

export default router;
